using System.Collections;
using System.Collections.Generic;

namespace VirtualDeveloper.Filters
{
    internal class LineSkipper<T> : IEnumerable<T>
    {
        private readonly IEnumerator<T> enumerator;

        public LineSkipper(IEnumerable<T> enumerable, int everyLineCount)
        {
            enumerator = new SkipperEnumerator<T>(enumerable, everyLineCount);
        }

        public IEnumerator<T> GetEnumerator()
        {
            return enumerator;
        }

        IEnumerator IEnumerable.GetEnumerator()
        {
            return GetEnumerator();
        }
    }
}